package com.ship.contract.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ship.contract.bean.ConInsuranceGoods;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ConInsuranceGoodsMapper extends BaseMapper<ConInsuranceGoods> {

    /**
     * 根据id查询所有信息
     */
    @Select("SELECT * FROM con_insurance_goods WHERE id = #{id}")
    ConInsuranceGoods getById(@Param("id") Long id);

    /**
     * 获取所有合同编号
     * @return
     */
    @Select("SELECT contract_number FROM con_insurance_goods")
    List<String> getAllContractNumbers();
}
